﻿using System;
using System.Collections.Generic;
using System.Text;
using UnityEngine;

public class SceneObject : ObjectData
{
    private Point _objId;
    private int _type;
    private int _modelId;
    public string configFile;
    public SceneObject(Point ID, int type, int modelId)
        : base(null, ID.ToString())
    {
        ObjID = ID;
        _type = type;
        _modelId = modelId;

        //InitXML.getInstance().AnalyzeXml(configFile, this);
        
    }


    public int Type
    {
        get { return _type; }
        set { _type = value; }
    }
    public int ModelId
    {
        get { return _modelId; }
        set { _modelId = value; }
    }
    public Point ObjID
    {
        get { return _objId; }
        set 
        { 
            _objId = value;
            base.ObjKey = value.ToString();
        }
    }
    override public void HandlePropertiesEx(string PropertiesName, object PropertiesValue)
    {
        if (PropertiesName == "Type") _type = (int)PropertiesValue;
        if (PropertiesName == "Model") _modelId = (int)PropertiesValue;
        base.HandlePropertiesEx(PropertiesName, PropertiesValue);
    }
    override public void DeletePropertiesEx(string PropertiesName)
    {
        base.DeletePropertiesEx(PropertiesName);
    }
}